You put the for-loop inside the loop() function which runs endlessly. Simply move it to setup() : void setup() { Serial.begin(9600); for(int ... ... <看更多>
In the Arduino paradigm, unlike ordinary C programming where there is only 1 entry point called "main()", there are 2 entry points called "setup()" and ... ... <看更多>